Presently, many network applications, for example, streaming media, require low-delay experience of users. End-to-end data transmission in the network applications is realized through a User Datagram Protocol (UDP), while the UDP does not provide a rate adjustment mechanism, so the following problems exist in this case.
First, in the end-to-end transmission of data through the UDP, when the network bandwidth is reduced, or the channel quality deteriorates, the reduced bandwidth cannot transmit the data sent at the current rate, which causes network buffer overflow, and results in loss of the sent data.
Second, when a client buffer is about to be full of data, so that data overflow and then data loss occurs, as the UDP does not provide a rate adjustment mechanism, the data sending rate cannot be lowered, client buffer overflow cannot be avoided, and the sent data will be lost; and when the client buffer is about to be exhausted of data, so that the client will have no data available, as the UDP does not provide the rate adjustment mechanism, the data sending rate cannot be raised, and the client buffer underflow cannot be avoided.
To solve the above problems, the following solution is adopted in the prior art. The client collects statistics on data occupancy in the client buffer, and sends the data occupancy in the buffer to a server; and the server adjusts a gradually increasing or decreasing coefficient of the data sending rate according to the data occupancy in the buffer and a packet loss ratio.
Although the technical solution for preventing the client buffer overflow solves the problem of the client buffer overflow, no statistics is collected on the occupancy of the network buffer between the server and the data client in the technical solution, so the problem of network buffer overflow cannot be prevented.